package basicShapes;

import java.awt.Graphics2D;
import java.awt.geom.Arc2D;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import image.Image;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "upperLeftCornerX",
    "upperLeftCornerY",
    "extent",
    "height",
    "width",
    "startAngle"
})
@XmlRootElement
public class Arc extends Image {

	@XmlAttribute
	protected double upperLeftCornerX;
	@XmlAttribute
	protected double upperLeftCornerY;
	@XmlAttribute
	protected double extent;
	@XmlAttribute
	protected double height;
	@XmlAttribute
	protected double width;
	@XmlAttribute
	protected double startAngle;
	
	public Arc() {
		
	}
	
	public Arc (double upperLeftCornerX,
				double upperLeftCornerY,
				double width,
				double height,			
				double startAngle,
				double extent,
				int type){
		
		this.upperLeftCornerX =upperLeftCornerX;
		this.upperLeftCornerY =upperLeftCornerY;
		this.width = width;
		this.height=height;
		this.startAngle = startAngle;
		this.extent = extent;
		
		
	}
	
	public void draw( Graphics2D g){
		g.draw(new Arc2D.Double(upperLeftCornerX, upperLeftCornerY, width, height, startAngle, extent, Arc2D.OPEN));
	}
	public String toString(){
		return "Arc - x:"+this.upperLeftCornerX
						+" y:"+this.upperLeftCornerY
						+" width: "+this.width
						+" height: "+this.height
						+" start angle: "+this.startAngle
						+" extent :"+this.extent;
	}
}
